<div id="sidebar" class="sidebar">
	{% assign sorted_collections = site.collections | sort: "position" %}
	{% for collection in sorted_collections %}
		{% if collection.label != "posts" %}
			<section>
				<h6>{{ collection.title }}</h6>
				<ul>
					{% assign sorted_docs = collection.docs | sort: "position" %}
					{% for doc in sorted_docs %}
						<li>
							<a href="{% if page.url != '/' %}/{% endif %}#{{ doc.id | replace: '/', '' | replace: '.', ''}}">
								{{ doc.title }}
								{% if doc.type %}<span class="endpoint {{ doc.type }}"></span>{% endif %}
							</a>
						</li>
					{% endfor %}
				</ul>
			</section>
		{% endif %}
	{% endfor %}
</div>
